package com.base.cn.platform.os.service.course.classes.topic.type;

import com.base.cn.platform.os.entity.classes.topic.type.ClassesTopicType;
import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.course.CourseBaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 班级话题类型
 *
 * @author zjh
 * @since 2019-05-17
 */
@FeignClient(value = CourseBaseService.appName, configuration = FeignAuthConfig.class)
public interface ClassesTopicTypeService extends CourseBaseService {


    /**
     * 查询班级话题类型列表
     * @param type       查询
     * @param currentPage  当前页
     * @param pageSize     每页数据量
     * @return 班级话题类型列表
     */
    @RequestMapping(contextPath + "/findClassesTopicTypePage")
    Map<String,Object> findClassesTopicTypePage(@RequestBody ClassesTopicType type,
                                                @RequestParam("currentPage") int currentPage,
                                                @RequestParam(value = "pageSize", required = false) Integer pageSize);


    /**
     * 查询班级话题类型
     * @param classesId  班级id
     * @return 班级话题类型
     */
    @RequestMapping(contextPath + "/getClassesTopicType")
    List<Map<String,Object>> getClassesTopicType(@RequestParam("classesId") BigDecimal classesId);

    /**
     * 保存班级话题类型
     * @param type
     * @return 班级话题类型
     */
    @RequestMapping(contextPath + "/saveClassesTopicType")
    Map<String,Object> saveClassesTopicType(@RequestBody ClassesTopicType type);
    /**
     * 更新数据话题类型状态
     * @param ids id
     * @param status
     * @return 班级话题类型
     */
    @RequestMapping(contextPath + "/updateTopicTypeStatus")
    public Map<String,Object> updateTopicTypeStatus(@RequestParam("ids") String ids,
                                                    @RequestParam(value = "status") int status);


    /**
     * 获取班级，分类数据
     * @param classId 班级id
     * @return 班级话题类型
     */
    @RequestMapping(contextPath + "/getClassesTypeNum")
     List<Map<String,Object>>getClassesTypeNum(@RequestParam(value = "classId", required = false) BigDecimal classId, @RequestParam(value = "userId", required = false) BigDecimal userId);


}
